#ifndef QTOOLMENU_P_H
#define QTOOLMENU_P_H

#include <QObject>
#include <QFrame>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMap>
#include <QVector>
#include <QToolButton>


class QLabelEx :public QLabel{
	Q_OBJECT
public:
	QLabelEx(QWidget* parent = 0);
	~QLabelEx();

	void		showLabel(bool bShow);
	bool		isShowLabel();

	QFrame*		m_pLine;
	QWidget*	m_pAttachWidget;
	int			m_nIndexWidget;

protected:
	void		enterEvent(QEvent* e);
	void		leaveEvent(QEvent* e);
	void		mousePressEvent(QMouseEvent *event);
	void		mouseDoubleClickEvent(QMouseEvent *event);
	//void		mouseMoveEvent(QMouseEvent *event);
private:

	bool		m_bShow;
signals:
	void		onOpenTabWidgetSignal(QWidget*);
	void		onOpenTabIndexSignal(int);
};

typedef  QVector<QLabelEx*>		QGroupMenu;

class QPrivateData {

public:

	explicit QPrivateData()
	{
		m_pLevelOneNavWidget = NULL;
		m_pLevelTwoNavWidget = NULL;

		m_pLevelOneHBoxlayout = NULL;
		m_pLevelTwoHBoxlayout = NULL;

		m_nDefaultMenuIndex = 0;
		m_nMenuAlignment = Qt::AlignHCenter;
	}
	QWidget*		m_pLevelOneNavWidget;
	QWidget*		m_pLevelTwoNavWidget;
	QHBoxLayout*	m_pLevelOneHBoxlayout;
	QHBoxLayout*	m_pLevelTwoHBoxlayout;

	QVector<QToolButton*>  m_vetLevelOneMenu;
	QStringList		m_listLevelOneText;

	QMap<int,QStringList>  m_mapLevelTwoText;
	QMap<int,QGroupMenu*>   m_mapLevelTwoMenu;

	int				m_nDefaultMenuIndex;
	Qt::Alignment	m_nMenuAlignment;
};

#endif // QTOOLMENU_P_H
